#ifndef CLIENT_H
#define CLIENT_H
#include "ServerStruct.h"

typedef struct {
    ClientList *client_list;
    Client     *client;
} ClientListIterator;

ClientList         *client_list_create();
void                client_list_add(ClientList *list, Client *client);
void                client_list_remove(ClientList *list, Client *client);
ClientListIterator *client_list_iterator_create(ClientList *list);
Client             *client_list_iterator_next(ClientListIterator *iter);
void                client_list_iterator_reset(ClientListIterator *iter);

Client *create_client(int client_fd);
void    reset_client(Client *client);
void    set_client_is_connected(Client *client);
void     set_client_is_busy(Client *client);
void    set_client_is_closed(Client *client);
int     client_get_status(Client *client);
void    client_safe_free(Client *client);
void    client_remain_free(Client *client);
void    client_full_free(Client *client);

#endif // CLIENT_H
